import Vue from 'vue'
import Router from 'vue-router'

import login from '@/components/login/login'
import version from '@/components/version/version'
import index from '@/components/index/index'
import welcome from '@/components/index/welcome/welcome'
import wrapper from '@/components/wrapper/wrapper'
import bomList from '@/components/index/bomList/bomList'
import clientList from '@/components/index/clientList/clientList'
import programList from '@/components/index/programList/programList'
import programfileList from '@/components/index/programfileList/programfileList'
import programsurplusList from '@/components/index/programsurplusList/programsurplusList'
import userManage from '@/components/index/userManage/userManage'

import scanList from '@/components/index/scanList/scanList'
import programListDetail from '@/components/index/programListDetail/programListDetail'
import surplusList from '@/components/index/surplusList/surplusList'
import pcbaScannerList from '@/components/index/pcbaScannerList/index'
import pcbaRecordList from '@/components/index/pcbaRecordList/index'
import pcbaStatisticsList from '@/components/index/pcbaStatisticsList/index'
import pcbaStatisticsTypeList from '@/components/index/pcbaStatisticsTypeList/index'
import reflowTempDesign from '@/components/index/reflowTempDesign/index'
import stencil from '@/components/index/stencil/index'
import solderPaste from '@/components/index/solderPaste/index'
import scanHistoryList from '@/components/index/scanHistoryList/index'
import reflowTempList from '@/components/index/reflowTempList/index'
import spiDetailList from '@/components/index/spiDetailList/index'

import speclibList from '@/components/index/speclibList/speclibList'
import statusList from '@/components/index/statusList/statusList'
import lineStatus from '@/components/index/lineStatus/lineStatus'
import lineStatusTV from '@/components/index/lineStatusTV/lineStatusTV'
import lineStatusTVBroad from '@/components/index/lineStatusTVBroad/lineStatusTVBroad'
import lineBoard from '@/components/index/lineBoard/lineBoard'
import lineBoardTV from '@/components/index/lineBoardTV/lineBoardTV'
import card from '@/base/card'
import testTable from '@/base/AutoWidthTable'
import clock from '@/base/Clock'

import counterConfig from '@/components/index/counterConfig/counterConfig'


import aoiCheck from '@/components/aoiCheck/index'
import repairConfirm from '@/components/repairConfirm/index'
import pcbaAB from '@/components/pcbaAB/index'
import aoiWrapper from '@/components/aoiWrapper/wrapper'
Vue.use(Router)



const wrapperChildren = [
  {
    path: 'welcome',
    component: welcome
  },
  {
    path: 'statusList',
    component: statusList
  },
  {
    path: 'lineStatus',
    component: lineStatus
  },
  {
    path: 'scanList',
    component: scanList
  },
  {
    path: 'testtable',
    component: testTable
  },
  {
    path: 'counterConfig',
    component: counterConfig
  },
  {
    path: 'clock',
    component: clock
  },
      {
        path: 'bomList',
        name: 'bomList',
        component: bomList
      },
      {
        path: 'clientList',
        name: 'clientList',
        component: clientList
      },
      {
        path: 'programList',
        name: 'programList',
        component: programList
      },
      {
        path: 'programFileList',
        name: 'programFileList',
        component: programfileList
      },
      {
        path: 'programSurplusList',
        name: 'programSurplusList',
        component: programsurplusList
      },{
        path: 'programListDetail',
        name: 'programListDetail',
        component: programListDetail
      },
      {
        path: 'speclibList',
        name: 'speclibList',
        component: speclibList
      },
      {
        path: 'surplusList',
        name: 'surplusList',
        component: surplusList
      },
  {
    path: 'lineBoard',
    name: 'lineBoard',
    component: lineBoard
  },
  {
    path: 'user',
    name: 'userManage',
    component: userManage
  },
  {
    path: 'pcbaScannerList',
    name: 'pcbaScannerList',
    component: pcbaScannerList
  },
  {
    path: 'pcbaRecordList',
    name: 'pcbaRecordList',
    component: pcbaRecordList
  },
  {
    path: 'pcbaStatisticsList',
    name: 'pcbaStatisticsList',
    component: pcbaStatisticsList
  },{
    path: 'pcbaStatisticsTypeList',
    name: 'pcbaStatisticsTypeList',
    component: pcbaStatisticsTypeList
  },
  {
    path: 'reflowTempDesign',
    name: 'reflowTempDesign',
    component: reflowTempDesign
  },
  {
    path: 'solderPaste',
    name: 'solderPaste',
    component: solderPaste
  },
  {
    path: 'stencil',
    name: 'stencil',
    component: stencil
  },
  {
    path: 'scanHistoryList',
    name: 'scanHistoryList',
    component: scanHistoryList
  },
  {
    path: 'reflowTempList',
    name: 'reflowTempList',
    component: reflowTempList
  },
  {
    path: 'spiDetailList',
    name: 'spiDetailList',
    component: spiDetailList
  },
]

const aoiWrapperChildren = [
  {
    path: '/',
    redirect: '/aoiWrapper/aoiCheck'
  },
  {
    path: 'aoiCheck',
    name: 'aoiCheck',
    component: aoiCheck
  },
  {
    path: 'repairConfirm',
    name: 'repairConfirm',
    component: repairConfirm
  },{
    path: 'pcbaAB',
    name: 'pcbaAB',
    component: pcbaAB
  },
]
export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/wrapper/welcome'
    },
    {
      path: '/version',
      component: version
    },
    {
      path: '/lineStatus',
      component: lineStatusTVBroad
    },
    {
      path: '/lineBoard',
      component: lineBoardTV
    },

    {
      path: '/lineStatusTV',
      component: lineStatusTVBroad
    },
    {
      path: '/lineStatusTVBroad',
      component: lineStatusTVBroad
    },

    {
      path: '/lineBoard',
      name: 'lineBoard1',
      component: lineBoard
    },

    {
      path: '/welcome',
      name: 'welcome',
      component: welcome
    },

    {
      path: '/wrapper',
      name: 'wrapper',
      component: wrapper,
      children: wrapperChildren
    },

    {
      path: '/aoiWrapper',
      name: 'wrapper',
      component: aoiWrapper,
      children: aoiWrapperChildren
    },

    {
      path: '/login',
      name: 'Login',
      component: login
    },
  ]
})



// {
//   path: '/',
//   redirect: '/index'
// },

// {
//   path: '/',
//   component: index,
//   children: [
//     {
//       path: '',
//       redirect: 'welcome'
//     },
//     {
//       path: 'welcome',
//       name: 'welcome',
//       component: welcome
//     },
//
//     {
//       path: 'scanList',
//       name: 'scanList',
//       component: scanList
//     },
//     {
//       path: 'bomList',
//       name: 'bomList',
//       component: bomList
//     },
//     {
//       path: 'clientList',
//       name: 'clientList',
//       component: clientList
//     },
//     {
//       path: 'programList',
//       name: 'programList',
//       component: programList
//     },
//     {
//       path: 'programFileList',
//       name: 'programFileList',
//       component: programList
//     },
//     {
//       path: 'speclibList',
//       name: 'speclibList',
//       component: speclibList
//     },
//     {
//       path: 'card',
//       name: 'card',
//       component: card
//     },
//   ]
// },


